package com.one.wishes.ui;

//import android.support.v4.view.animation.FastOutSlowInInterpolator;
import android.view.animation.Animation;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;

import androidx.interpolator.view.animation.FastOutSlowInInterpolator;

public class AnimationUtils {
	public static final Interpolator LINEAR_INTERPOLATOR = new LinearInterpolator();
	public static final Interpolator FAST_OUT_SLOW_IN_INTERPOLATOR = new FastOutSlowInInterpolator();
	public static final Interpolator DECELERATE_INTERPOLATOR = new DecelerateInterpolator();

	AnimationUtils() {
	}

	static float lerp(float startValue, float endValue, float fraction) {
		return startValue + fraction * (endValue - startValue);
	}

	static int lerp(int startValue, int endValue, float fraction) {
		return startValue
				+ Math.round(fraction * (float) (endValue - startValue));
	}

	public static class AnimationListenerAdapter implements
			Animation.AnimationListener {
		public AnimationListenerAdapter() {
		}

		public void onAnimationStart(Animation animation) {
		}

		public void onAnimationEnd(Animation animation) {
		}

		public void onAnimationRepeat(Animation animation) {
		}
	}
}